package com.hoshiibuy.dictionary.controller;

import com.hoshiibuy.dictionary.service.IDicDataBankService;
import com.hoshiibuy.dictionary.entity.DicDataBankVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author guangjinwei
 * @create 2019-04-18
 */
@RestController
@RequestMapping("dicDataBank/")
@Api(value = "银行信息管理", tags = {"银行信息操作接口"})
public class DicDataBankController {
    private final Logger LOGGER = LoggerFactory.getLogger(DicDataBankController.class);

    @Autowired
    IDicDataBankService dicDataBankService;

    @RequestMapping(value = "/saveDicDataBank", method = RequestMethod.POST)
    @ApiOperation(
            value = "保存银行信息",
            notes = "保存银行信息",
            produces = "application/json, application/xml",
            consumes = "application/json, application/xml")
    public void saveDicDataBank(DicDataBankVo dicDataBankVo){
        dicDataBankService.saveDicDataBank(dicDataBankVo);
    }

    @RequestMapping(value = "/findDicDataBankList", method = RequestMethod.GET)
    @ApiOperation(
            value = "查询银行信息",
            notes = "查询银行信息",
            produces = "application/json, application/xml",
            consumes = "application/json, application/xml")
    public List<DicDataBankVo> findDicDataBankList(){
        return dicDataBankService.findDicDataBankList();
    }

}
